package com.xjoyt.pay.operater.auth.interfaces;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.dto.PageParam;
import com.xjoyt.pay.dto.PageResult;
import com.xjoyt.pay.operater.auth.params.AccountUserParam;
import com.xjoyt.pay.operater.auth.params.UserPageParam;
import com.xjoyt.pay.operater.auth.po.AccountUser;
import com.xjoyt.pay.params.ChangePasswordParam;
import com.xjoyt.pay.params.LoginParam;

public interface UserContract {

	@RequestMapping(value = "get/{id}",method = RequestMethod.GET)
	AccountUser get(@PathVariable("id") String id);

	@RequestMapping(value = "loadPage",method = RequestMethod.GET)
	PageResult<AccountUser> loadPage(@RequestBody PageParam<UserPageParam> param);

	@RequestMapping(value = "save", method = RequestMethod.POST)
	ExecuteResult<AccountUser> save(AccountUserParam param);

	@RequestMapping(value = "remove/{id}",method = RequestMethod.POST)
	ExecuteResult<?> remove(@PathVariable("id") String id);

	@RequestMapping(value = "getByAccount", method = RequestMethod.POST)
	ExecuteResult<AccountUser> getByAccount(LoginParam param);

	@RequestMapping(value = "changePassword", method = RequestMethod.POST)
	ExecuteResult<?> changePassword(ChangePasswordParam param);
}
